<template>
    <div class="container">
        <!-- 表单组件 -->
        <div class="create_post_form">
            <CreatedPostForm :draft="draft" />
        </div>
        <!-- 草稿箱 -->
        <div class="draft">
            <Draft @draftChange="draftChange" />
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            draft: null,
        };
    },
    methods: {
        draftChange(value) {
            this.draft = value.form;
        },
    },
};
</script>

<style lang="less" scoped>
.container {
    width: 1000px;
    margin: 0 auto;
    display: flex;
    padding-top: 20px;
    justify-content: space-between;
    .create_post_form {
        width: 750px;
    }
    .draft {
        width: 225px;
    }
}
</style>
